home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
euphor14.zip
/
DEMO.DOC
< prev
next >
Wrap
Text File
|
1996-04-05
|
5KB
|
117 lines
DEMO Programs Written in Euphoria
---------------------------------
This directory contains a number of example programs written in Euphoria.
These programs are being contributed to the Public Domain by
Rapid Deployment Software. You are encouraged to modify and redistribute
any of these programs.
To run them type 'ex' followed by the file name. e.g. ex polygon
If you are in Windows, and you have associated .ex files with ex.exe, you
can simply double-click to run any .ex file. A few of the simpler
programs expect to be run from the command line and they will terminate
immediately after displaying something.
You can view and modify these programs using any editor, but we recommend
using the Euphoria editor, ed, so you can get color syntax highlighting.
-----------------------------------------------------------------------------
Note! If you have trouble running any of the graphics oriented programs, try
changing the line that says:
constant GRAPHICS_MODE = 261 -- SVGA
to:
constant GRAPHICS_MODE = 18 -- VGA
This will provide VGA resolution, and is less likely to cause problems.
See include\graphics.e for other possible graphics modes. You should also
run under DOS or in a full-screen DOS window under Windows. (Press Alt-Enter)
-----------------------------------------------------------------------------
NAME DESCRIPTION
---- -----------
allsorts.ex - comparison of different sorting algorithms
- which is the fastest sorting algorithm in Euphoria?
animal.ex - guess the animal game
- let the computer guess which animal you are thinking of
- it learns about animals as you play
- great fun for the kids
bitmap.ex - displays bitmap (.BMP) pictures
buzz.ex - "buzzword" generator - Try adding your own phrases.
callmach.ex - an example of calling machine code from Euphoria
dosint.ex - some examples of calling DOS system interrupt routines
example.ex - example merge_sort program from the reference manual
ex.pro - ex.pro is created when you run example.ex. It contains
the profile output for example.ex.
learn.ex - a quick test of your Euphoria knowledge
mouse.ex - simple demo of get_mouse() built-in function
- you need DOS mouse support for this
mset.ex - Mandelbrot Set (fractal) generator
- Press Enter to stop the display and change all the colors
- Press Enter again to choose a region of the M-set to zoom in on
- use the arrow keys to select a box to enlarge, or type 'q'
to quit
- your picture is saved in a file
- this one will take a few minutes as hundreds of floating-point
calculations are performed *per pixel*.
- see if you can run mset with a higher-resolution graphics mode
mydata.ex - a simple database program
plot3d.ex - 3-D surface plotting of functions
- add in your own function of x and y, and see it plotted
- Press Enter to move on to the next sample function
polygon.ex - displays interesting polygon patterns
- hit space bar to see a new pattern
queens.ex - solves the N queens problem - how to place N queens on an NxN
chess board so they do not attack each other (N = 8 for a
standard board).
sanity.ex - this program tests hundreds of features of Euphoria, in a quick,
self-test. If this program reports "PASSED" then Euphoria is
working on your machine. If not, there may be something wrong.
sb.ex - bouncing balls screen blank program
simple.ex - compiled "with trace" so you can see a program execute
by hitting Enter for each statement. Just Press down on
the Enter key.
stereo.ex - make a random dot stereo picture:
- reads "picture" file by default
ttt.ex - 3-dimensional tic tac toe
- try to get 4 in a row, on any plane or 1 per plane
- play against "DEFENDO" or "AGGRESSO" or a human, or
watch the AGGRESSO and DEFENDO algorithms slug it out
- you need DOS mouse support for a human to play
wire.ex - 3-D wire frame demo of the big 'E' in Euphoria
- hit space bar to freeze/restart the display
- Enter to quit
bench directory - contains benchmark programs for comparing Euphoria
against QBasic. Don't take our word for it! - see
how fast Euphoria is on your machine
langwar directory - contains a real-time star wars type game
- read lw.doc, ex lw
-----------------------------------------------------
-- See the .ex files themselves for more details. --
-- You can view them with: ed filename.ex --
-----------------------------------------------------